-- region StateMachine.lua
-- Author : nimol&soso
-- Date   : 2015/6/2
-- Description ：状态机 
require "chapter/ChapterControl"
require "vip/VipControl"
require "arena/shop/ArenaShopControl"
require "embattle/EnemyControl"
require "battle_result/PlayerUpgradeControl"
require "bloodArena/rank/BloodArenaRankControl"
require "bloodArena/shop/BloodArenaShopControl"
require "bloodArena/MatchSuccessControl"
require "chapter/ChapterSweepControl"
require "battle_result/ObtainExpControl"
require "hero/HeroDetailControl"
require "hero/EnemyHeroControl"
require "equip/equipStrong/EquipStrongControl"
require "equip/equipStrong/EquipFumoControl"
require "gods/GodsRankControl"
require "gods/GodsVsControl"
require "embattle/EmbattleControl"
require "hero/EmptyHeroControl"
require "hero/HeroUpgradeControl"
require "hero/HeroUpQualityControl"
require "hero/HeroSelectControl"
require "test/TestRichTextControl"
require "lottery/shopEquip/LotteryShopEquipControl"
require "lottery/shopHero/LotteryShopControl"
require "hero/HeroControl"
require "equip/equipMain/EquipControl"
require "shenqi/ShenqiControl"
require "equip/equipMerge/EquipMergeControl"
require "smithing/SmithingControl"
require "inherit/InheritControl"
require "shenqiPlunder/ShenqiPlunderControl"
require "titan/TitanControl"
require "lottery/equip/LotteryEquipControl"
require "lottery/hero/LotteryHeroControl"
require "heroesTrial/HeroTrialControl"
require "thraceBattle/ThraceBattleControl"
require "bloodArena/BloodArenaControl"
require "worldboss/WorldBossEntryControl"
require "gods/GodsControl"
require "arena/ArenaControl"
require "task/TaskControl"
require "shenqi/ShenqiShopControl"
require "shenqi/ShenqiUpGradeControl"
require "shenqi/ShenqiGotItemControl"
require "thraceBattle/ThraceListControl"
require "thraceBattle/shop/ThraceShopControl"
require "titan/shop/ShopControl"
require "worldboss/WorldBossChallengeControl"
require "worldboss/WorldBossLevelRankControl" 
require "godsPalace/GodsPalaceControl"
require "friend/FriendControl"
require "chapter/ChapterInfoControl"
require "reward/exp/ExpControl"
require "reward/reward/RewardControl"






---------------------------------------------------------
--                  定义所有资源的路径
---------------------------------------------------------
local r_activity = "res/activity/activity"
local r_arena = "res/arena/arena"
local r_battleView = "res/battleView/battleView"
local r_battle_result = "res/battle_result/battle_result"
local r_bloodArena = "res/bloodArena/bloodArena"
local r_chapter = "res/chapter/chapter"
local r_sweep = "res/chapter/sweep"
local r_embattle = "res/embattle/embattle"
local r_equip = "res/equip/equip"
local r_friend = "res/friend/friend"
-- 注意：gaim_hero 目录下的一大堆 gain_hero.plist 都没有加进来 
local r_gods = "res/gods/gods"
local r_gods_palace = "res/gods_palace/gods_palace"
local r_guide = "res/guide/guide"
local r_hero = "res/hero/hero"
local r_herochip = "res/herochip/herochip"
-- 注意这个的目录和名字不一样
local r_heroesTrial = "res/heroesTrial/hero_trial"  
local r_heroRole = "res/heroRole/heroRole"
local r_inherit = "res/inherit/inherit"
local r_login = "res/login/login"
local r_lotteryHero = "res/lotteryHero/lotteryHero"
local r_mail = "res/mail/mail"
local r_main = "res/main/main"
local r_main_bg1 = "res/main_bg1/main_bg1"
local r_main_bg2 = "res/main_bg2/main_bg3"
local r_main_bg3 = "res/main_bg3/main_bg3"
local r_midas = "res/midas/midas"
local r_nameds = "res/nameds/nameds"
local r_player_exp = "res/player_exp/player_exp"
local r_playLvEff = "res/playerLvEff/playerLvEff"
local r_playersInfo = "res/playersInfo/playersInfo"
local r_rewardInfo = 'res/reward/reward'
local r_shenqi = "res/shenqi/shenqi"
local r_shenqiPlunder = "res/shenqiPlunder/shenqiPlunder"
local r_signin = "res/signin/signin"
local r_skill = "res/skill/skill"
local r_smithing = "res/smithing/smithing"
local r_sociaty = "res/sociaty/sociaty"
local r_task = "res/task/task"
local r_thrace_battle = "res/thraceBattle/thrace_battle"
local r_thrace_battle1 = "res/thraceBattle/thrace_battle1"
local r_titan = "res/titan/titan"
local r_top_boon = "res/top_boon/top_boon"
local r_ui_effect = "res/ui_effect/ui_effect"
local r_vip = "res/vip/vip"
local r_worldboss = "res/worldboss/worldboss"
-- 趋于公共化的资源列表
local r_portrait = "res/portrait/portrait"
local r_portrait1 = "res/portrait1/portrait1"
local r_props = "res/props/props"
local r_public1 = "res/public1/public1"
local r_public = "res/public/public"




--状态机键值  
StateMachine = 
{ 
    s_Chapter = {name="Chapter",control=ChapterControl,openstate={"battle"},
        aryRes={r_chapter},mainTop=true},
    s_Vip = {name="Vip",control=VipControl,
		aryRes={r_vip},mainTop=true},
    s_ArenaShop = {name="ArenaShop",control=ArenaShopControl,
		aryRes={},mainTop=true},
    s_Enemy = {name="Enemy",control=EnemyControl,
		aryRes={},mainTop=true},
    s_PlayerUpgrade = {name="PlayerUpgrade",control=PlayerUpgradeControl,
		aryRes={r_battle_result,r_playLvEff}},
    s_BloodArenaRank = {name="BloodArenaRank",control=BloodArenaRankControl,
		aryRes={},mainTop=true},
    s_BloodArenaShop = {name="BloodArenaShop",control=BloodArenaShopControl,
		aryRes={},mainTop=true},
    s_MatchSuccess = {name="MatchSuccess",control=MatchSuccessControl,
		aryRes={}},
    s_ChapterSweep = {name="ChapterSweep",control=ChapterSweepControl,
		aryRes={r_sweep}},
    s_ObtainExp = {name="ObtainExp",control=ObtainExpControl,
		aryRes={r_battle_result }},
    s_HeroDetail = {name="HeroDetail",control=HeroDetailControl,
		aryRes={},mainTop=true},
    s_EnemyHero = {name="EnemyHero",control=EnemyHeroControl,
		aryRes={},mainTop=true},
    s_EquipStrong = {name="EquipStrong",control=EquipStrongControl,
		aryRes={},mainTop=true},
    s_EquipFumo = {name="EquipFumo",control=EquipFumoControl,
		aryRes={},mainTop=true},
    s_GodsRank = {name="GodsRank",control=GodsRankControl,
		aryRes={},mainTop=true},
    s_GodsVs = {name="GodsVs",control=GodsVsControl,
		aryRes={},mainTop=true},
    s_Embattle = {name="Embattle",control=EmbattleControl,
		aryRes={},mainTop=true},
    s_EmptyHero = {name="EmptyHero",control=EmptyHeroControl,
		aryRes={},mainTop=true},
    s_HeroUpgrade = {name="HeroUpgrade",control=HeroUpgradeControl,
		aryRes={},mainTop=true},
    s_HeroUpQuality = {name="HeroUpQuality",control=HeroUpQualityControl,
		aryRes={},mainTop=true},
    s_HeroSelect = {name="HeroSelect",control=HeroSelectControl,
		aryRes={},mainTop=true},
    s_TestRichText = {name="TestRichText",control=TestRichTextControl,
		aryRes={}},
    s_LotteryShopEquip = {name="LotteryShopEquip",control=LotteryShopEquipControl,
        aryRes={},mainTop=true},
    s_LotteryShop = {name="LotteryShop",control=LotteryShopControl,
        aryRes={},mainTop=true},
    s_Hero = {name="Hero",control=HeroControl,
        aryRes={},mainTop=true},
    s_Equip = {name="Equip",control=EquipControl,openstate={"equip"},
        aryRes={},mainTop=true},
    s_Shenqi = {name="Shenqi",control=ShenqiControl,openstate={"relic"},
        aryRes={  r_shenqi },mainTop=true},
    s_EquipMerge = {name="EquipMerge",control=EquipMergeControl,openstate={"compose"},
        aryRes={},mainTop=true},
    s_Smithing = {name="Smithing",control=SmithingControl,openstate={"forge"},
        aryRes={ r_smithing },mainTop=true},
    s_Inherit = {name="Inherit",control=InheritControl,openstate={"inherit"},
        aryRes={ r_inherit },mainTop=true},
    s_ShenqiPlunder = {name="ShenqiPlunder",control=ShenqiPlunderControl,openstate={"relic_battle"},
        aryRes={ r_shenqiPlunder },mainTop=true},
    s_Titan = {name="Titan",control=TitanControl,openstate={"titan_war"},
        aryRes={ r_titan },mainTop=true},
    s_LotteryEquip = {name="LotteryEquip",control=LotteryEquipControl,openstate={"lotteryequip"},
        aryRes={},mainTop=true},
    s_LotteryHero = {name="LotteryHero",control=LotteryHeroControl,openstate={"lotteryhero"},
        aryRes={},mainTop=true},
    s_HeroTrial = {name="HeroTrial",control=HeroTrialControl,openstate={"heroes_trial"},
        aryRes={ r_heroesTrial },mainTop=true},
    s_ThraceBattle = {name="ThraceBattle",control=ThraceBattleControl,openstate={"war_battle"},
        aryRes={ r_thrace_battle,r_thrace_battle1, },mainTop=true},
    s_BloodArena = {name="BloodArena",control=BloodArenaControl,openstate={"blood_fight"},
        aryRes={ r_bloodArena },mainTop=true},
    s_WorldBossEntry = {name="WorldBossEntry",control=WorldBossEntryControl,openstate={"world_boss"},
        aryRes={ r_worldboss },mainTop=true},
    s_Gods = {name="Gods",control=GodsControl,openstate={"tower_battle"},
        aryRes={ r_gods,},mainTop=true},
    s_Arena = {name="Arena",control=ArenaControl,openstate={"arena"},
        aryRes={ r_arena },mainTop=true},
    s_Task = {name="Task",control=TaskControl,openstate={"task"},
        aryRes={ r_task },mainTop=true},
    s_ShenqiShop = {name="ShenqiShop",control=ShenqiShopControl,
        aryRes={},mainTop=true},
    s_ShenqiUpGrade = {name="ShenqiUpGrade",control=ShenqiUpGradeControl,
        aryRes={},mainTop=true},
    s_ShenqiGotItem = {name="ShenqiGotItem",control=ShenqiGotItemControl,
        aryRes={} },
    s_ThraceList = {name="ThraceList",control=ThraceListControl,
        aryRes={},mainTop=true},
    s_ThraceShop = {name="ThraceShop",control=ThraceShopControl,
        aryRes={},mainTop=true},
    s_Shop = {name="Shop",control=ShopControl,
        aryRes={} },
    s_WorldBossChallenge = {name="WorldBossChallenge",control=WorldBossChallengeControl,
        aryRes={},mainTop=true},
    s_WorldBossLevelRank = {name="WorldBossLevelRank",control=WorldBossLevelRankControl,
        aryRes={},mainTop=true},
	s_GodsPalace = {name="GodsPalace",control=GodsPalaceControl,openstate={"gods_place"},
        aryRes={ r_gods_palace, },mainTop=true},
	s_Friend = {name="Friend",control=FriendControl,openstate={"friend"},
        aryRes={ r_friend },mainTop=true},
	s_ChapterInfo = {name="ChapterInfo",control=ChapterInfoControl,
        aryRes={},mainTop=true},
    s_Exp = {name="Exp",control=ExpControl.ExpControl,
        aryRes={r_rewardInfo} },
    s_Reward = {name="Reward",control=RewardControl.RewardControl,
        aryRes={r_rewardInfo} },
     
}  
 
